package com.bonc.ioc.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * @Description 文件上床记录实体类
 * @Author wxf
 * @Date 2021/4/19
 **/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class FileUpload {
    /*
    主键id
     */
    private Integer id;

    /*
    初始文件名称
     */
    private String fileName;

    /*
    新文件名称
     */
    private String fileNewName;

    /*
    文件路径
     */
    private String filePath;

    /*
    创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    public FileUpload(String oldName, String newFileName, String uploadPth, Date date) {
        this.fileName = oldName;
        this.fileNewName = newFileName;
        this.filePath = uploadPth;
        this.createTime = date;
    }
}
